{include file=member.header.html}
<script type="text/javascript">
//<!CDATA[
$(function()
{
    var map = {$map};
    var path = "{res file=images/}";
    if (map.length > 0)
    {
        var option = {openImg: path + "treetable/tv-collapsable.gif", shutImg: path + "treetable/tv-expandable.gif", leafImg: path + "treetable/tv-item.gif", lastOpenImg: path + "treetable/tv-collapsable-last.gif", lastShutImg: path + "treetable/tv-expandable-last.gif", lastLeafImg: path + "treetable/tv-item-last.gif", vertLineImg: path + "treetable/vertline.gif", blankImg: path + "treetable/blank.gif", collapse: false, column: 1, striped: false, highlight: false, state:false};
        $("#treet1").jqTreeTable(map, option);
    }
    var t = new EditableTable($('#my_category'));
});
//]]>
</script>
<!-- 内容 -->
<div class="content f-cb">
  <!-- 当前位置 -->
  {include file=path.html}
  <!-- 内容左边栏 -->
  {include file=member.menu.html}
  <!-- 内容右边栏 -->
  <div class="con-shop-r">
    <div class="goods-category-t" title="{$lang.gcategory_add}"><b class="ico3 b-radius" ectype="dialog" dialog_title="{$lang.gcategory_add}" dialog_id="my_category_add" dialog_width="480" uri="index.php?app=my_category&amp;act=add">+{$lang.gcategory_add}</b></div>
    <div class="table">
      <table id="my_category" server="{$site_url}/index.php?app=my_category&act=ajax_col">
        <!-- {if $gcategories} -->
        <tr class="line_bold" >
          <th width="50"><input id="all" type="checkbox" class="checkall" /></th>
          <th class="align1" colspan="4"> <label for="all"> <span class="all">{$lang.checkall}</span> </label>
            <a href="javascript:void(0);" class="delete" ectype="batchbutton" uri="index.php?app=my_category&act=drop" name="id" presubmit="confirm('{$lang.drop_confirm}')">{$lang.drop}</a> </th>
        </tr>
        <tr class="gray backgroundh" ectype="table_header">
          <th width="50">&nbsp;</th>
          <th class="" coltype="editable" column="cate_name" checker="check_required" inputwidth="50%" align="left"><p style="padding-left:20px;">{$lang.cate_name}</p></th>
          <th class="" coltype="editable" column="sort_order" checker="check_max" inputwidth="30px">{$lang.sort_order}</th>
          <th class="" coltype="switchable" column="if_show" checker="" onclass="right_ico" offclass="wrong_ico">{$lang.if_show}</th>
          <th class="">{$lang.handle}</th>
        </tr>
        <!-- {/if} -->
        <!-- {if $gcategories} -->
        <tbody id="treet1">
          <!-- {/if} -->
          <!-- {foreach from=$gcategories item=gcategory name=v} -->
          <tr class="line<!--{if $smarty.foreach.v.last}--> last_line<!--{/if}-->" ectype="table_item" idvalue="{$gcategory.cate_id}">
            <td class="align2"><input type="checkbox" class="checkitem" value="{$gcategory.cate_id}" /></td>
            <td width="550">&nbsp;&nbsp;<span ectype="editobj" class="goods-category-item">{$gcategory.cate_name|escape}</span></td>
            <td class="align2" width="80"><span ectype="editobj">{$gcategory.sort_order}</span></td>
            <td width="100"><p style="padding-left:45px;"><span 
                <!--{if $gcategory.if_show}-->
                class="right_ico" status="on"
                <!--{else}-->
                class="wrong_ico" status="off"
                <!--{/if}-->
                ectype="editobj"></span></p></td>
            <td><!-- {if $gcategory.layer lt 2} -->
              <a href="javascript:void(0);" ectype="dialog" dialog_width="480" dialog_title="{$lang.add_child}" dialog_id="my_category_add" uri="index.php?app=my_category&amp;act=add&amp;pid={$gcategory.cate_id}" class="add1_ico">{$lang.add_child}</a>
              <!-- {/if} -->
              <a href="javascript:void(0);" ectype="dialog" dialog_width="480" dialog_title="{$lang.edit}" dialog_id="my_category_edit" uri="index.php?app=my_category&amp;act=edit&amp;id={$gcategory.cate_id}" class="edit1">{$lang.edit}</a> <a href="javascript:drop_confirm('{$lang.drop_confirm}', 'index.php?app=my_category&amp;act=drop&id={$gcategory.cate_id}');" class="delete">{$lang.drop}</a></td>
          </tr>
          <!-- {foreachelse} -->
          <tr>
            <td colspan="5" class="member_no_records padding6">{$lang.no_records}</td>
          </tr>
          <!--{/foreach}-->
          <!-- {if $gcategories} -->
        </tbody>
        <!-- {/if} -->
        <!-- {if $gcategories} -->
        <tr class="line_bold line_bold_bottom">
          <td colspan="5">&nbsp;</td>
        </tr>
        <tr>
          <td align="center"><input id="all2" type="checkbox" class="checkall" />
            </td>
          <td colspan="4"><p class="position1">
              <label for="all2"><span class="all">{$lang.checkall}</span></label>
              <a href="javascript:void(0);" ectype="batchbutton" class="delete" uri="index.php?app=my_category&act=drop" name="id" presubmit="confirm('{$lang.drop_confirm}')">{$lang.drop}</a></p>
            </td>
        </tr>
        <!-- {/if} -->
      </table>
    </div>
    <iframe name="pop_warning" style="display:none"></iframe>
  </div>
</div>
<!-- 页脚 -->
{include file=footer.html}